#ifndef _MYTASK_H
#define _MYTASK_H

#include "01_Threadpool.hpp"
#include "05_Task.hpp"
#include <time.h>
#include <unistd.h>     // unix standard
#include <stdlib.h>
#include <stdio.h>

//class TaskQueue;

class MyTask
:public Task
{
public:
    MyTask(int id, int& isDone):_id(id), _isDone(isDone){}

    void process() override
    {
        printf("05_MyTask | Task %d is running, isDone = %d\n", _id, _isDone);
        sleep(1);
        _isDone = 1;
        printf("05_MyTask | Task %d is finished, isDone = %d\n",_id, _isDone);
        
    }
private:
    int _id;
    int& _isDone;
};

#endif

